import upload from '@/utils/upload'
import request from '@/utils/request'

// 获取验证码
export function sendCode(data) {
	return request({
		'url': '/sms/sendcode',
		method: 'get',
		timeout: 2000,
		data
	})
}


//用户注册
export function reg(data) {
	return request({
		url: '/self/user/reg',
		method: 'get',
		data
	})

}

// 用户密码重置
export function changePassword(data) {
	return request({
		url: '/self/user/changePassword',
		method: 'get',
		data
	})
}
// 用户头像上传
export function uploadAvatar(data) {
	return upload({
		url: '/self/user/upload',
		method: 'get',
		filePath: data.file
	})
}







// 修改用户个人信息
export function changeInfo(data) {
	return request({
		url: '/self/user/changeInfo',
		method: 'get',
		data: data
	})
}
